package com.cardone.platform.usercenter.service;

import java.util.List;

import lombok.Getter;
import lombok.Setter;

import com.cardone.common.dto.PaginationDto;
import com.cardone.context.ContextHolder;
import com.cardone.platform.usercenter.dao.UsOrgTranslateDao;
import com.cardone.platform.usercenter.dto.UsOrgTranslateDto;

/**
 * 用户组织调动服务
 *
 * @author yaohaitao
 *
 */
@Getter
@Setter
public class UsOrgTranslateDefaultService implements UsOrgTranslateService {
	@Override
	public int deleteByIds(final UsOrgTranslateDto deleteUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).deleteByIds(deleteUsOrgTranslate);
	}

	@Override
	public <P> P findByCodeOrId(final Class<P> mappedClass, final UsOrgTranslateDto findUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).findByCodeOrId(mappedClass, findUsOrgTranslate);
	}

	@Override
	public <P> P findById(final Class<P> mappedClass, final UsOrgTranslateDto findUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).findById(mappedClass, findUsOrgTranslate);
	}

	@Override
	public <P> List<P> findListByLikeCode(final Class<P> mappedClass, final UsOrgTranslateDto findListUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).findListByLikeCode(mappedClass, findListUsOrgTranslate);
	}

	@Override
	public int insertByCode(final UsOrgTranslateDto insertUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).insertByCode(insertUsOrgTranslate);
	}

	@Override
	public <P> PaginationDto<P> paginationByLikeCode(final Class<P> mappedClass, final UsOrgTranslateDto paginationUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).paginationByLikeCode(mappedClass, paginationUsOrgTranslate);
	}

	@Override
	public Integer readByCodeNqIdForCount(final UsOrgTranslateDto readUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).readByCodeNqIdForCount(readUsOrgTranslate);
	}

	@Override
	public <P> P saveByIdOrCode(final Class<P> mappedClass, final UsOrgTranslateDto saveUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).saveByIdOrCode(mappedClass, saveUsOrgTranslate);
	}

	@Override
	public int updateByCode(final UsOrgTranslateDto updateUsOrgTranslate) {
		return ContextHolder.getBean(UsOrgTranslateDao.class).updateByCode(updateUsOrgTranslate);
	}
}